<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            padding: 0;
            margin: 0;
            list-style: none;
        }

        .qin {
            width: 900px;
            height: 400px;
              background-image: url(./e.png);
            margin: 10px auto;
            border: 1px solid red;
            background-size: 900px 400px;
            cursor: pointer;
        }

       .qin ul li {
            width: 98px;
            height: 400px;
       
            float: left;
        }

    </style>
</head>

<body>
    <div class="qin">
        <ul>
            <li><audio src="./notes/1.oga" ></audio></li>
            <li><audio src="./notes/2.oga" ></audio></li>
            <li><audio src="./notes/3.oga" ></audio></li>
            <li><audio src="./notes/4.oga" ></audio></li>
            <li><audio src="./notes/5.oga" ></audio></li>
            <li><audio src="./notes/6.oga" ></audio></li>
            <li><audio src="./notes/7.oga" ></audio></li>
            <li><audio src="./notes/8.oga" ></audio></li>
            <li><audio src="./notes/9.oga" ></audio></li>
        </ul>
    </div>
   
    <script>
        var audio = document.querySelectorAll(".qin>ul>li>audio");

        var lis = document.querySelectorAll(".qin>ul>li");

        for (let i = 0; i < lis.length; i++) {

            lis[i].onclick = function () {
                audio[i].load();  //重新加载
                audio[i].play();  //播放音频
            }

        }
    </script>
</body>

</html>